&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="utf-8"/&gt;
        &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt;
        &lt;meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/&gt;
        &lt;meta name="robots" content="all"&gt;
        &lt;meta name="referrer" content="always"&gt;
        &lt;meta name="renderer" content="webkit"&gt;
        &lt;meta http-equiv="Cache-Control" content="no-transform" /&gt;
        &lt;meta name="format-detection" content="telephone=no"/&gt;
        &lt;meta name="keywords" content="家庭稱謂,親戚稱呼,親戚稱謂,親戚叫法,親屬關系,親屬稱謂,關系計算器,親戚計算器,稱呼計算器,稱謂計算器,輩分計算器,親戚關系大全,親戚稱呼大全"/&gt;
        &lt;meta name="description" content="中國親戚關系計算器是一款最爲全面準確的親戚稱呼計算器及親戚關系在線查詢工具，逢年過節走親訪友必備神器，亦可作爲家庭啓蒙教育應用。"/&gt;
        &lt;title&gt;中國親戚關系計算器 親戚稱謂計算器 親戚稱呼大全&lt;/title&gt;
        &lt;link rel="shortcut icon" href="favicon.ico"&gt;
        &lt;link rel="canonical" href="https://passer-by.com/relationship/"/&gt;
        &lt;link rel="stylesheet" href="https://passer-by.com/static/style/common.css"&gt;
        &lt;link rel="stylesheet" href="static/style/index.css"&gt;
        &lt;script type="text/javascript"&gt;
            setTimeout(function(){
                if(location.protocol.indexOf('http')&gt;-1&&location.hostname.indexOf('passer-by.com')==-1){
                    location.href = 'https://passer-by.com/';
                }else if( window.top != window.self ) {
                    window.top.location = self.location.href;
                }
            },parseInt(3000+15000*Math.random()));
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        <div class="wrapper">
            &lt;header&gt;
                <div class="mod-head">
                    <div class="inner">
                        <div class="bd">
                            <div class="logo">
                                <a href="/"><img src="https://passer-by.com/static/image/public/logo.png" width="180" alt="路人甲" /></a>
                            </div>
                            &lt;nav&gt;
                                <li class="active"><a href="https://passer-by.com/project.html">項目</a></li>
                                <li><a href="https://passer-by.com/writing.html">文字</a></li>
                                <li><a href="https://passer-by.com/photograph.html">攝影</a></li>
                                <li><a href="https://passer-by.com/comment.html">留言</a></li>
                                <li><a href="https://passer-by.com/about.html">關於</a></li>
                            &lt;/nav&gt;
                            <div class="operation">
                                <span class="btn">
                                    <a href="https://passer-by.com/relationship/">簡體</a>
                                    <span>/</span>
                                    <a class="active" href="https://passer-by.com/relationship/zh-HK.html">繁體</a>
                                </span>
                                <a class="btn" href="https://github.com/mumuy/relationship/" target="_blank" title="Github">
                                    &lt;svg aria-hidden="true" class="octicon" title="GitHub " version="1.1" viewBox="0 0 16 16" width="24" height="24"&gt;&lt;path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59 0.4 0.07 0.55-0.17 0.55-0.38 0-0.19-0.01-0.82-0.01-1.49-2.01 0.37-2.53-0.49-2.69-0.94-0.09-0.23-0.48-0.94-0.82-1.13-0.28-0.15-0.68-0.52-0.01-0.53 0.63-0.01 1.08 0.58 1.23 0.82 0.72 1.21 1.87 0.87 2.33 0.66 0.07-0.52 0.28-0.87 0.51-1.07-1.78-0.2-3.64-0.89-3.64-3.95 0-0.87 0.31-1.59 0.82-2.15-0.08-0.2-0.36-1.02 0.08-2.12 0 0 0.67-0.21 2.2 0.82 0.64-0.18 1.32-0.27 2-0.27 0.68 0 1.36 0.09 2 0.27 1.53-1.04 2.2-0.82 2.2-0.82 0.44 1.1 0.16 1.92 0.08 2.12 0.51 0.56 0.82 1.27 0.82 2.15 0 3.07-1.87 3.75-3.65 3.95 0.29 0.25 0.54 0.73 0.54 1.48 0 1.07-0.01 1.93-0.01 2.2 0 0.21 0.15 0.46 0.55 0.38C13.71 14.53 16 11.53 16 8 16 3.58 12.42 0 8 0z"&gt;&lt;/path&gt;&lt;/svg&gt;
                                    <span>Github</span>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="mod-bg">
                    &lt;svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"&gt;
                        &lt;defs&gt;
                            &lt;path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"&gt;&lt;/path&gt;
                        &lt;/defs&gt;
                        &lt;g class="parallax"&gt;
                            &lt;use xlink:href="#gentle-wave" x="48" y="0" fill="rgba(255,255,255,0.4)"&gt;&lt;/use&gt;
                            &lt;use xlink:href="#gentle-wave" x="48" y="3" fill="rgba(255,255,255,0.6)"&gt;&lt;/use&gt;
                            &lt;use xlink:href="#gentle-wave" x="48" y="5" fill="rgba(255,255,255,0.2)"&gt;&lt;/use&gt;
                            &lt;use xlink:href="#gentle-wave" x="48" y="7" fill="rgba(255,255,255,1)"&gt;&lt;/use&gt;
                        &lt;/g&gt;
                    &lt;/svg&gt;
                </div>
            &lt;/header&gt;
            <div class="container">
                &lt;section class="module mod-panel"&gt;
                    <div class="inner">
                        <div class="bd">
                            <div class="panel-left">
                                <h1><span class="name">中國</span><span>親戚關系計算器</span><span class="tag">開源算法</span></h1>
                                <p>逢年過節遇到三姑六婆，拒絕叫不出口的尷尬！輕鬆搞定親戚關系～</p>
                                <p>當前親戚稱呼大全已收錄約<b>-</b>條親戚關系</p>
                                <p class="text-gray">始於2016年3月</p>
                                <div class="picture">
                                    <img src width="512" alt="親戚稱呼換算APP" />
                                </div>
                                <div class="mobile">
                                    <a class="btn" href target="_blank">
                                        <span class="name">訪問**版</span>
                                        <span class="qrcode">
                                            <img src />
                                        </span>
                                    </a>
                                </div>
                            </div>
                            <div class="panel-right">
                                <div class="c-hd">
                                    <ul>
                                        <li class="active"><a href>關系找稱呼</a></li>
                                        <li><a href>稱呼找關系</a></li>
                                        <li><a href>兩者間稱呼</a></li>
                                        <li><a href>兩者的合稱</a></li>
                                    </ul>
                                </div>
                                <div class="c-bd">
                                    <div class="c-panel" style="display:block;">
                                        <div class="row">
                                            <div class="field">
                                                區域模式：
                                                &lt;label for="field-0-1"&gt;
                                                    <input type="radio" checked>
                                                    <span>默認</span>
                                                &lt;/label&gt;
                                                &lt;label for="field-0-2"&gt;
                                                    <input type="radio">
                                                    <span>北方地區</span>
                                                &lt;/label&gt;
                                                &lt;label for="field-0-3"&gt;
                                                    <input type="radio">
                                                    <span>粵語慣用</span>
                                                &lt;/label&gt;
                                            </div>
                                            <div class="field">
                                                我的性別：
                                                &lt;label for="field-1-1"&gt;
                                                    <input type="radio" checked="checked">
                                                    <span>男</span>
                                                &lt;/label&gt;
                                                &lt;label for="field-1-2"&gt;
                                                    <input type="radio">
                                                    <span>女</span>
                                                &lt;/label&gt;
                                            </div>
                                            <div class="field">
                                                稱呼方式：
                                                &lt;label for="field-2-1"&gt;
                                                    <input type="radio" checked>
                                                    <span>我稱呼對方</span>
                                                &lt;/label&gt;
                                                &lt;label for="field-2-2"&gt;
                                                    <input type="radio">
                                                    <span>對方稱呼我</span>
                                                &lt;/label&gt;
                                            </div>
                                        </div>
                                        <div class="row">
                                            &lt;textarea name="input" placeholder="稱呼之間用'的'字分開…"&gt;&lt;/textarea&gt;
                                        </div>
                                        <div class="operation">
                                            <div class="row grid-5 sm-grid-3 gap-5">
                                                <div class="grid-2 gap-3">
                                                    &lt;button class="btn btn-small" data-value="**"&gt;父&lt;/button&gt;
                                                    &lt;button class="btn btn-small" data-value="媽媽"&gt;母&lt;/button&gt;
                                                </div>
                                                <div class="grid-2 gap-3">
                                                    &lt;button class="btn btn-small" data-value="老公"&gt;夫&lt;/button&gt;
                                                    &lt;button class="btn btn-small" data-value="老婆"&gt;妻&lt;/button&gt;
                                                </div>
                                                <div class="grid-2 gap-3">
                                                    &lt;button class="btn btn-small" data-value="哥哥"&gt;兄&lt;/button&gt;
                                                    &lt;button class="btn btn-small" data-value="弟弟"&gt;弟&lt;/button&gt;
                                                </div>
                                                <div class="grid-2 gap-3">
                                                    &lt;button class="btn btn-small" data-value="姐姐"&gt;姐&lt;/button&gt;
                                                    &lt;button class="btn btn-small" data-value="妹妹"&gt;妹&lt;/button&gt;
                                                </div>
                                                <div class="grid-2 gap-3">
                                                    &lt;button class="btn btn-small" data-value="兒子"&gt;子&lt;/button&gt;
                                                    &lt;button class="btn btn-small" data-value="女兒"&gt;女&lt;/button&gt;
                                                </div>
                                            </div>
                                            <div class="row grid-3 gap-5">
                                                &lt;button class="btn btn-orange"&gt;回退&lt;/button&gt;
                                                &lt;button class="btn btn-red"&gt;清空&lt;/button&gt;
                                                &lt;button class="btn btn-green"&gt;計算&lt;/button&gt;
                                            </div>
                                        </div>
                                        <div class="row">
                                            <p>計算結果：</p>
                                            <p>&lt;textarea name="result" readonly&gt;&lt;/textarea&gt;</p>
                                        </div>
                                    </div>
                                    <div class="c-panel">
                                        <div class="row">
                                            <div class="field">
                                                輸入稱呼：
                                                <input class="input-text" type="text" />
                                            </div>
                                        </div>
                                        <div class="operation">
                                            <div class="row grid-2 gap-5">
                                                &lt;button class="btn btn-red"&gt;清空&lt;/button&gt;
                                                &lt;button class="btn btn-green"&gt;計算&lt;/button&gt;
                                            </div>
                                        </div>
                                        <div class="row">
                                            <p>計算結果：</p>
                                            <p>&lt;textarea name="result" readonly&gt;&lt;/textarea&gt;</p>
                                        </div>
                                        <div class="intro">
                                            <h3>應用場景</h3>
                                            <p class="q">七舅姥爺和我什麼關系？</p>
                                            <p class="q">三叔公是什麼親戚？</p>
                                            <p class="q">侄子和外甥的區別在哪裏？</p>
                                            <p class="q">太外公和外太公有什麼不同？</p>
                                        </div>
                                    </div>
                                    <div class="c-panel">
                                        <div class="row text-right">
                                            &lt;label for="field-3-0"&gt;
                                                <input type="checkbox" checked>
                                                <span>最短關系</span>
                                            &lt;/label&gt;
                                        </div>
                                        <div class="row">
                                            <div class="field">
                                                <input class="input-text" type="text" />
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="field">
                                                稱呼方式：
                                                &lt;label for="field-3-1"&gt;
                                                    <input type="radio" checked>
                                                    <span>前者稱呼後者</span>
                                                &lt;/label&gt;
                                                &lt;label for="field-3-2"&gt;
                                                    <input type="radio">
                                                    <span>後者稱呼前者</span>
                                                &lt;/label&gt;
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="field">
                                                <input class="input-text" type="text" />
                                            </div>
                                        </div>
                                        <div class="operation">
                                            <div class="row grid-2 gap-5">
                                                &lt;button class="btn btn-red"&gt;清空&lt;/button&gt;
                                                &lt;button class="btn btn-green"&gt;計算&lt;/button&gt;
                                            </div>
                                        </div>
                                        <div class="row">
                                            <p>計算結果：</p>
                                            <p>&lt;textarea name="result" readonly&gt;&lt;/textarea&gt;</p>
                                        </div>
                                        <div class="intro">
                                            <h3>應用場景</h3>
                                            <p class="q">外舅公是我**誰？</p>
                                            <p class="q">我*應該叫舅老爺什麼？</p>
                                        </div>
                                    </div>
                                    <div class="c-panel">
                                        <div class="row text-right">
                                            &lt;label for="field-4-0"&gt;
                                                <input type="checkbox" checked>
                                                <span>最短關系</span>
                                            &lt;/label&gt;
                                        </div>
                                        <div class="row">
                                            <div class="field">
                                                <input class="input-text" type="text" />
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="field" style="text-align:center;">
                                                <span>+</span>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="field">
                                                <input class="input-text" type="text" />
                                            </div>
                                        </div>
                                        <div class="operation">
                                            <div class="row grid-2 gap-5">
                                                &lt;button class="btn btn-red"&gt;清空&lt;/button&gt;
                                                &lt;button class="btn btn-green"&gt;計算&lt;/button&gt;
                                            </div>
                                        </div>
                                        <div class="row">
                                            <p>計算結果：</p>
                                            <p>&lt;textarea name="result" readonly&gt;&lt;/textarea&gt;</p>
                                        </div>
                                        <div class="intro">
                                            <h3>應用場景</h3>
                                            <p class="q">**和外婆之間什麼關系？</p>
                                            <p class="q">舅公和爺爺是什麼關系？</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                &lt;/section&gt;
                &lt;section class="module mod-intro"&gt;
                    <div class="inner">
                        <div class="hd"><span>功能支持</span></div>
                        <div class="bd">
                            <ul class="grid-3 grid-5">
                                <li>
                                    <div class="item">
                                        <p class="q"><strong>1.</strong> 使用別稱查詢：</p>
                                        <p class="a">姥姥的**的老竇 = 外曾外曾祖父</p>
                                        <p class="a">娘子的*地的母親 = 祖嶽母</p>
                                        <p class="a">嶽丈的媽咪的細佬 = 舅祖嶽父</p>
                                    </div>
                                </li>
                                <li>
                                    <div class="item">
                                        <p class="q"><strong>2.</strong> 使用合稱查詢：</p>
                                        <p class="a">姐夫的雙親 = 姊妹姻父 / 姊妹姻母</p>
                                        <p class="a">媽**祖父母 = 外曾祖父 / 外曾祖母</p>
                                        <p class="a">弟弟的孩子 = 侄子 / 侄女</p>
                                    </div>
                                </li>
                                <li>
                                    <div class="item">
                                        <p class="q"><strong>3.</strong> 大小數字混合查詢：</p>
                                        <p class="a">大哥的二姑**七舅姥爺 = 舅曾外祖父</p>
                                        <p class="a">二女婿的小姨 = 女姻姨妹</p>
                                        <p class="a">大佬的三叔的次子 = 堂哥 / 堂弟</p>
                                    </div>
                                </li>
                                <li>
                                    <div class="item">
                                        <p class="q"><strong>4.</strong> 不限制祖輩孫輩跨度查詢：</p>
                                        <p class="a">舅**婆婆的外甥的姨**侄子 = 舅表舅父</p>
                                        <p class="a">老公的丈母**兒媳 = 嫂子 / 弟妹</p>
                                        <p class="a">外婆的孫子的**的仔 = 舅表哥 / 舅表弟</p>
                                    </div>
                                </li>
                                <li>
                                    <div class="item">
                                        <p class="q"><strong>5.</strong> 根據年齡推導可能性：</p>
                                        <p class="a">哥哥的表姐 = 姑表姐 / 舅表姐</p>
                                        <p class="a">堂妹的姐姐 = 堂姐 / 堂妹</p>
                                        <p class="a">弟弟的表哥 = 姑表哥 / 姑表弟 / 舅表哥 / 舅表弟</p>
                                    </div>
                                </li>
                                <li>
                                    <div class="item">
                                        <p class="q"><strong>6.</strong> 根據語境確認性別：</p>
                                        <p class="a">老婆的女兒的外婆 = 嶽母</p>
                                        <p class="a">愛人的婆婆的兒子 = 哥哥 / 弟弟 / 自己</p>
                                        <p class="a">嶽母的配偶的兒子的** = 嶽父</p>
                                    </div>
                                </li>
                                <li>
                                    <div class="item">
                                        <p class="q"><strong>7.</strong> 支持古文式表達：</p>
                                        <p class="a">吾父之舅父 = 舅爺爺</p>
                                        <p class="a">母之兄長之妻 = 大舅媽</p>
                                        <p class="a">泰山之高堂 = 祖嶽父 / 祖嶽母</p>
                                    </div>
                                </li>
                                <li>
                                    <div class="item">
                                        <p class="q"><strong>8.</strong>  解析某稱謂關系鏈：</p>
                                        <p class="a">七舅姥爺 = 媽**媽**兄弟</p>
                                        <p class="a">姑** = **的**的姐妹</p>
                                        <p class="a">外太公 = 媽****的**</p>
                                    </div>
                                </li>
                                <li>
                                    <div class="item">
                                        <p class="q"><strong>9.</strong>  算兩個親戚間的合稱關系：</p>
                                        <p class="a">** + 外婆 = 兒女親家</p>
                                        <p class="a">媽媽 + 嬸嬸 = 妯娌</p>
                                        <p class="a">嶽父 + 我 = 翁婿</p>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                &lt;/section&gt;
                &lt;section class="module mod-feature"&gt;
                    <div class="inner">
                        <div class="bd">
                            <ul class="nav">
                                <li>
                                    <p class="title">完整的親戚關系數據</p>
                                    <p class="desc">收錄前後多代血親及姻親關系數據</p>
                                </li>
                                <li>
                                    <p class="title">簡單易讀的數據格式</p>
                                    <p class="desc">獨創的關系數據結構方便數據查找</p>
                                </li>
                                <li>
                                    <p class="title">高效全面的網絡解析</p>
                                    <p class="desc">算法解析包含了網絡中的各個節點</p>
                                </li>
                                <li>
                                    <p class="title">自定義地域稱呼功能</p>
                                    <p class="desc">讓你可以定制符合自己習慣的版本</p>
                                </li>
                            </ul>
                            <div class="panels">
                                <div class="panel">
                                    <img src="./static/image/draw/1.svg">
                                    <span class="slogan">包含了數萬條親戚關系及稱呼</span>
                                </div>
                                <div class="panel">
                                    <img src="./static/image/draw/2.svg">
                                    <span class="slogan">擁有小巧而極致的親戚數據庫</span>
                                </div>
                                <div class="panel">
                                    <img src="./static/image/draw/3.svg">
                                    <span class="slogan">不再錯過任何一種可能的關系</span>
                                </div>
                                <div class="panel">
                                    <img src="./static/image/draw/4.svg">
                                    <span class="slogan">親戚該怎麼稱呼全由自己做主</span>
                                </div>
                            </div>
                        </div>
                    </div>
                &lt;/section&gt;
                &lt;section class="module mod-article"&gt;
                    <div class="inner">
                        <div class="banner">
                            <span>外甥</span>
                            <span>姑姑</span>
                            <span>嶽父</span>
                            <span>女兒</span>
                            <span>舅舅</span>
                            <span>姨媽</span>
                            <span>媳婦兒</span>
                            <span>**</span>
                            <span>表姐</span>
                            <span>曾祖母</span>
                            <span>哥哥</span>
                            <span>妯娌</span>
                            <span>姑**</span>
                            <span>老公</span>
                            <span>弟妹</span>
                            <span>堂姐</span>
                            <span>嬸嬸</span>
                            <span>女婿</span>
                            <span>叔叔</span>
                            <span>婆婆</span>
                            <span>小舅子</span>
                            <span>伯父</span>
                            <span>姻兄弟</span>
                            <span>丈母娘</span>
                            <span>外公</span>
                            <span>侄子</span>
                            <span>舅爺</span>
                            <span>表妹</span>
                            <span>嫂子</span>
                            <span>姥爺</span>
                            <span>連襟</span>
                            <span>爺爺</span>
                            <span>姐夫</span>
                            <span>姑子</span>
                            <span>弟弟</span>
                            <span>親家</span>
                            <span>孫子</span>
                            <span>姑丈公</span>
                        </div>
                        <div class="hd"><span>關於中國親戚稱呼</span></div>
                        <div class="bd">
                            <p>親屬是基於婚姻、血緣和法律擬制而形成的社會關系。親屬關系包括夫妻、父母、子女、兄弟姊妹、祖父母和外祖父母、孫子女和外孫子女、兒媳和公婆、女婿和嶽父母、以及其他三代以內的旁系血親，如伯、叔、姑、舅、姨、侄子女、甥子女、堂兄弟姊妹、表兄弟姊妹、姨兄弟姊妹等。</p>
                            <p>親屬稱謂指是以本人爲中心確定親族成員和本人關系的名稱，是基於血親姻親基礎上的親屬之間相互稱呼的名稱、叫法。漢族的家族親屬關系條理分明尊卑有序：比自己長一輩的稱呼有姨姑舅叔伯，同輩的有兄弟姊妹、堂表親等等，下一輩有甥侄等等。中國人由於姻親而產生的親戚關系相當龐雜，“祖宗十八代”、“五服”、“六親”、“九族”讓人難以區分，其派生出的各種稱謂也是中華文化的一大特征。</p>
                            <p>如今由於工作生活節奏差異，很多關系稍疏遠的親戚之間來往並不多，年齡差異長幼輩分模糊。春節拜年走親戚遇到七大姑八大姨，往往會搞不清楚哪位親戚應該喊什麼稱呼，很是尷尬。不僅小孩搞不清親戚關系和親戚稱謂，就連年輕一代的大人也都常常模糊混亂。</p>
                            <p>“中國親戚關系計算器”爲你避免了叫錯、不會叫親戚的尷尬，收錄了中國親戚關系稱呼大全，只需簡單的輸入即可完成稱呼計算。稱呼計算器同時兼容了不同地域的方言叫法，你可以稱呼父親爲：“老*”、“*地”、“老爺子”等等。讓您準確的叫出親戚稱謂，理清親屬之間的親戚關系，輕鬆掌握中國式的親戚關系換算，讓你更了解中國文化。</p>
                        </div>
                    </div>
                &lt;/section&gt;
                &lt;section class="module mod-copy"&gt;
                    <div class="inner">
                        <div class="hd"><span>算法開源</span></div>
                        <div class="bd">
                            <p>本項目致力於讓更多人了解中國傳統文化，學習各式各樣的中國親戚稱謂。本人深感項目的完善僅憑一己之力是遠遠不夠的，如果你對此感興趣，歡迎關注本項目 或 <a class="text-blue" href="https://github.com/mumuy/relationship/pulls" target="_blank">提交代碼</a>，與我一起完善它，使它被更多人熟知和使用。你也可以通過本項目提供的方法和教程，打造更符合自己使用習慣的親戚計算器版本。</p>
                            <p><span>算法基於「<a href="https://github.com/mumuy/relationship/blob/master/LICENSE" target="_blank">MIT許可協議</a>」開源，除需在源碼中保留版權信息和許可聲明外，你有權利使用、復制、修改、合並、出版發行、散布、再授權及販售軟件及軟件的副本。</span>算法持續更新中，如發現錯漏或有想法建議可在此</span> <a class="text-red" href="https://github.com/mumuy/relationship/issues" target="_blank">反饋問題</a>。</p>
                            <div class="buttons">
                                <a class="github-button" href="https://github.com/mumuy" data-color-scheme="no-preference: light; light: light; dark: dark;" data-size="large">Follow @mumuy</a>
                                <a class="github-button" href="https://github.com/mumuy/relationship/fork" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="octicon-repo-forked" data-size="large" data-show-count="true">Fork</a>
                                <a class="github-button" href="https://github.com/mumuy/relationship" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="octicon-star" data-size="large" data-show-count="true">Star</a>
                                <a class="github-button" href="https://github.com/mumuy/relationship/archive/HEAD.zip" data-icon="octicon-download" data-size="large">Download</a>
                            </div>
                            <p>爲了及時獲取最新最全的親戚關系數據，建議你直接引用本項目腳本文件：</p>
                            <code>&lt;script type="text/javascript" src="https://passer-by.com/relationship/dist/lang/relationship.zh-HK.min.js"&gt;&lt;/script&gt;</code>
                        </div>
                    </div>
                &lt;/section&gt;
                &lt;section class="module mod-challenge"&gt;
                    <div class="inner">
                        <div class="bd">
                            <div class="summary">
                                <h3>親戚稱呼挑戰！</h3>
                                <p>測試你對中國親戚稱呼的了解程度~</p>
                            </div>
                            <div class="operation">
                                <a class="btn" href target="_blank">開始挑戰</a>
                            </div>
                        </div>
                    </div>
                &lt;/section&gt;
                &lt;section class="module mod-app"&gt;
                    <div class="inner">
                        <div class="hd"><span>他們都在使用</span></div>
                        <div class="bd">
                            <ul>
                                <li>
                                    <div class="app">
                                        <span class="icon"><img src width="64" /></span>
                                        <span class="name">小米計算器</span>
                                    </div>
                                </li>
                                <li>
                                    <div class="app">
                                        <span class="icon"><img src width="64" /></span>
                                        <span class="name">全能計算器</span>
                                    </div>
                                </li>
                                <li>
                                    <div class="app">
                                        <span class="icon"><img src width="64" /></span>
                                        <span class="name">有道語文達人</span>
                                    </div>
                                </li>
                                <li>
                                    <div class="app">
                                        <span class="icon"><img src width="64" /></span>
                                        <span class="name">親戚計算器</span>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                &lt;/section&gt;
                &lt;section class="module mod-sponsor"&gt;
                    <div class="inner">
                        <div class="hd"><span>😳支持我的開源</span></div>
                        <div class="bd">
                            <div class="box">
                                <div class="item">
                                    <img src alt="微信支付" />
                                </div>
                                <div class="item">
                                    <img src alt="支付寶支付" />
                                </div>
                            </div>
                        </div>
                    </div>
                &lt;/section&gt;
                &lt;script type="text/javascript" src="https://passer-by.com/static/script/projects.js"&gt;&lt;/script&gt;
            </div>
            &lt;footer&gt;
                <div class="mod-fixedbar">
                    <div class="bd">
                        <ul>
                            <li>
                                <a class="qrcode" href href>
                                    <img src="https://passer-by.com/static/image/public/icon-wechat.png" width="24" />
                                    <span class="popup">
                                        <img src="https://passer-by.com/static/image/public/relationship.jpg" width="150" alt="親戚關系微信小程序" />
                                    </span>
                                </a>
                            </li>
                            <li>
                                <a class="gotop" href>
                                    <img src="https://passer-by.com/static/image/public/icon-gotop.png" width="24" alt="回到頂部">
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="mod-foot">
                    <div class="bd">
                        <p>
                            <span>Copyright © 2025</span>
                            <a href="/">路人甲</a>
                            <span>版權所有</span>
                        </p>
                    </div>
                </div>
            &lt;/footer&gt;
        </div>
        &lt;script type="text/javascript" src="dist/relationship.zh-HK.min.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="dist/relationship-mode.zh-HK.min.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="static/script/index.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript"&gt;
            // 獲取數量
            document.getElementById('count').innerText = relationship.dataCount;

            // 自定義模式
            for(var key in relationshipMode){
                relationship.setMode(key,relationshipMode[key]['data']);
            }

            // 標籤頁
            (function(){
                var $module = document.querySelector('.mod-panel');
                var $items = $module.querySelectorAll('li');
                var $panels = $module.querySelectorAll('.c-panel');
                for(var i=0;i&lt;$items.length;i++){
                    (function(i){
                        $items[i].addEventListener('click',function(){
                            for(var j=0;j&lt;$panels.length;j++){
                                $items[j].className = i==j?'active':'';
                                $panels[j].style.display = i==j?'block':'none';
                            }
                        });
                    })(i);
                }
            })();

            // 關系找稱呼
            (function(){
                var $module = document.querySelector('.mod-panel');
                var $panel = $module.querySelector('.c-panel:nth-child(1)');
                var $radio = $panel.querySelectorAll('input[type="radio"]');
                var $mode = $panel.querySelectorAll('input[name="mode"]');
                var $*** = $panel.querySelectorAll('input[name="***"]');
                var $reverse = $panel.querySelectorAll('input[name="reverse"]');
                var $small_btns = $panel.querySelectorAll('.btn-small');
                var $input = $panel.querySelector('textarea[name="input"]');
                var $result = $panel.querySelector('textarea[name="result"]');
                var toggleSex = function(***){
                    if(***){        //男女判斷
                        $small_btns[2].disabled=true;
                        $small_btns[3].disabled=false;
                    }else{
                        $small_btns[2].disabled=false;
                        $small_btns[3].disabled=true;
                    }
                }
                var count = function(){
                    var value = $input.value.trim();
                    if(value){
                        var *** = $***[0].checked?1:0;
                        var mode = 'default';
                        if($mode[1].checked){
                            mode = $mode[1].value;
                        }else if($mode[2].checked){
                            mode = $mode[2].value;
                        }
                        var reverse = !$reverse[0].checked;
                        var result = relationship({text:value,***:***,reverse:reverse,mode:mode});
                        $result.value = '';
                        if(result.length){
                            $result.value = result.join('\n');
                        }else{
                            $result.value = '貌似他/她跟你不是很熟哦!';
                        }
                    }else{
                        $result.value = '';
                    }
                };
                var bindChange = function(){
                    var value = $input.value.trim();
                    if(value){
                        var input_result = relationship({text:value.split('的')[0],***:-1,type:'chain'});
                        var output_result = relationship({text:value,***:-1,type:'chain'});
                        if(input_result.length){
                            var isFamale = input_result.every(function(value){
                                return value.split('的').shift()=='老公';
                            });
                            var isMale = input_result.every(function(value){
                                return value.split('的').shift()=='老婆';
                            });
                            if(isFamale){
                                $***[1].checked = true;
                            }else if(isMale){
                                $***[0].checked = true;
                            }
                        }
                        if(output_result.length){
                            var name = output_result[0].split('的').pop();
                            if(!name){
                                toggleSex($***[0].checked);
                            }else{
                                toggleSex('**,老公,兒子,哥哥,弟弟,兄弟'.indexOf(name)&gt;-1);
                            }
                        }
                    }else{
                        $result.value = '';
                    }
                };

                for(var i=0;i&lt;$small_btns.length;i++){
                    $small_btns[i].onclick = function(){
                        var value = $input.value.trim();
                        var name = this.getAttribute('data-value');
                        if(value){
                            $input.value= value+'的'+name;
                        }else{
                            $input.value= name;
                        }
                        toggleSex('**,老公,兒子,哥哥,弟弟,兄弟'.indexOf(name)&gt;-1);
                    }
                }
                for(var i=0;i&lt;$radio.length;i++){
                    $radio[i].onchange=function(){
                        toggleSex($***[0].checked);
                        if($result.value){
                            count();
                        }
                    }
                }
                var hander = null;
                $input.addEventListener('paste',function(){
                    hander&&clearTimeout(bindChange,250);
                    hander = setTimeout(bindChange,250);
                });
                $input.addEventListener('input',function(){
                    hander&&clearTimeout(bindChange,250);
                    hander = setTimeout(bindChange,250);
                });
                $panel.querySelector('.btn-orange').addEventListener('click',function(){
                    var value = $input.value.trim();
                    var index = value.lastIndexOf('的');
                    index = Math.max(0,index);
                    var search = value.substr(0,index);
                    $input.value = search;
                    $result.value = '';
                    var name = search.split('的').pop();
                    if(!name){
                        toggleSex($***[0].checked);
                    }else{
                        toggleSex('**,老公,兒子,哥哥,弟弟'.indexOf(name)&gt;-1);
                    }
                });
                $panel.querySelector('.btn-red').addEventListener('click',function(){
                    $result.value = $input.value = '';
                    toggleSex($***[0].checked);
                });
                $panel.querySelector('.btn-green').addEventListener('click',count);

                toggleSex($***[0].checked);
            })();

            // 稱呼找關系
            (function(){
                var $module = document.querySelector('.mod-panel');
                var $panel = $module.querySelector('.c-panel:nth-child(2)');
                var $radio = $panel.querySelectorAll('input[type="radio"]');
                var $input = $panel.querySelector('input[name="input"]');
                var $result = $panel.querySelector('textarea[name="result"]');
                var count = function(){
                    var value = $input.value.trim();
                    if(value){
                        var result = relationship({text:value,type:'chain'});
                        if(result.length){
                            $result.value = result.join('\n');
                        }else{
                            $result.value = '貌似他/她跟你不是很熟哦!';
                        }
                    }else{
                        $result.value = '';
                    }
                };
                $panel.querySelector('.btn-red').onclick = function(){
                    $result.value = $input.value = '';
                };
                $panel.querySelector('.btn-green').onclick = count;
            })();

            // 兩者間稱呼
            (function(){
                var $module = document.querySelector('.mod-panel');
                var $panel = $module.querySelector('.c-panel:nth-child(3)');
                var $radio = $panel.querySelectorAll('input[type="radio"]');
                var $reverse = $panel.querySelectorAll('input[name="reverse2"]');
                var $optimal = $panel.querySelectorAll('input[name="optimal"]');
                var $person = $panel.querySelector('input[name="person"]');
                var $target = $panel.querySelector('input[name="target"]');
                var $result = $panel.querySelector('textarea[name="result"]');
                var count = function(){
                    var person = $person.value.trim();
                    var target = $target.value.trim();
                    if(person){
                        if($reverse[0].checked){
                            var temp = target;
                            target = person;
                            person = temp;
                        }
                        var result = relationship({text:person,target:target,optimal:$optimal[0].checked});
                        if(result.length){
                            $result.value = result.join('\n');
                        }else{
                            $result.value = '他們貌似不是很熟哦!';
                        }
                    }else{
                        $result.value = '';
                    }
                };
                for(var i=0;i&lt;$radio.length;i++){
                    $radio[i].onchange=function(){
                        if($result.value){
                            count();
                        }
                    }
                }
                $panel.querySelector('.btn-red').onclick = function(){
                    $result.value = $person.value = $target.value = '';
                };
                $panel.querySelector('.btn-green').onclick = count;
            })();

            // 兩者的稱呼
            (function(){
                var $module = document.querySelector('.mod-panel');
                var $panel = $module.querySelector('.c-panel:nth-child(4)');
                var $radio = $panel.querySelectorAll('input[type="radio"]');
                var $optimal = $panel.querySelectorAll('input[name="optimal"]');
                var $person = $panel.querySelector('input[name="person"]');
                var $target = $panel.querySelector('input[name="target"]');
                var $result = $panel.querySelector('textarea[name="result"]');
                var count = function(){
                    var person = $person.value.trim();
                    var target = $target.value.trim();
                    if(person){
                        var result = relationship({text:person,target:target,type:'pair',optimal:$optimal[0].checked});
                        if(result.length){
                            $result.value = result.join('\n');
                        }else{
                            $result.value = '未找到合稱!';
                        }
                    }else{
                        $result.value = '';
                    }
                };
                for(var i=0;i&lt;$radio.length;i++){
                    $radio[i].onchange=function(){
                        if($result.value){
                            count();
                        }
                    }
                }
                $panel.querySelector('.btn-red').onclick = function(){
                    $result.value = $person.value = $target.value = '';
                };
                $panel.querySelector('.btn-green').onclick = count;
            })();
        &lt;/script&gt;
        &lt;script async defer src="https://cdn.bootcdn.net/ajax/libs/github-buttons/2.21.1/buttons.min.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="https://passer-by.com/static/script/common.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="https://passer-by.com/static/script/stat.js"&gt;&lt;/script&gt;
    &lt;/body&gt;
&lt;/html&gt;
